<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>首页广告配置管理</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}viewer.min.css" type="text/css"/>
	<script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}viewer-jquery.min.js"></script>
</head>
<body>

<div class="container" style="width:96%">
	<table class="table table-bordered table-striped" align="center">
		<tr>
			<td><a href="?do=edit" class="btn btn-primary">添加首页广告</a></td>
		</tr>
	</table>
	<table class="table table-bordered table-striped table-hover" align="center">
		<thead>
		<tr>
			<td colspan="9">首页广告列表</td>
		</tr>
		</thead>
		<tbody>
		<tr>
			<td>标题</td>
			<td>icon图</td>
			<td>图一</td>
			<td>图二</td>
			<td>广告开始时间</td>
			<td>广告结束时间</td>
			<td>创建时间</td>
			<td>操作</td>
		</tr>

		{if !empty($list)}
			{foreach $list as $k=> $v}
				<tr style="height: 80px">
					<td align="center">{$v.Title}</td>
					<td align="center">
						<div style="height: 120px;width: 100px">
							<a class="img" target="_blank"><img src="{$v.IconUrl}" width="20px" height="20px" style="margin-top: 50px"/><a/>
						</div>
					</td>
					<td align="center">
						<a class="img" target="_blank"><img src="{$v.ImgUrl}" width="100px"
						                                             height="120px"/><a/>
					</td>
					<td align="center" style="width: 160px">
						{if $v['ImgUrl2']}
							<a class="img" target="_blank"><img src="{$v.ImgUrl2}" width="100px" height="120px"/><a/>
						{else}

						{/if}
					</td>
					<td align="center">{$v.StartTime}</td>
					<td align="center">{$v.EndTime}</td>
					<td align="center">{$v.CreateTime}</td>
					<td align="center">
						<a href="?do=delete&id={$v.Id}" class="btn btn-danger delete delete_btn">删除</a>
						<br/>
						<a href="?do=Edit&id={$v.Id}" class="btn btn-info">修改</a>
					</td>
				</tr>
			{/foreach}
		{/if}

		</tbody>
	</table>
	{if !empty($pagination)}
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td colspan="7" align="right">
					<div class="page_info">
						{if $page_info['count']}
							<div class="p_l">一共 {$page_info['count']} 条数据,共 {$page_info['page']} 页</div>
						{/if}
					</div>
					<div class="p_r">{$pagination}</div>
				</td>
			</tr>
		</table>
	{/if}
</div>

{literal}
	<script>
        $('.img').viewer();
        //删除
        $(".delete_btn").click(function () {
            var url = self.location.pathname + $(this).attr("href");
            top.__confirm('确定要删除吗？', '删除后不可恢复！', url, self);
            return false;
        });
	</script>
{/literal}
</body>
<html>